package com.API.dal.entities;

// Generated 03.06.2013 4:15:36 by Hibernate Tools 4.0.0

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * CostsTypes generated by hbm2java
 */
@Entity
@Table(name = "COSTS_TYPES", schema = "PUBLIC", catalog = "PUBLIC", uniqueConstraints = @UniqueConstraint(columnNames = "NAME"))
public class CostsTypes implements java.io.Serializable {

	private Integer id;
	private String name;
	private String description;
	private Set<Costs> costses = new HashSet<Costs>(0);

	public CostsTypes() {
	}

	public CostsTypes(String name) {
		this.name = name;
	}

	public CostsTypes(String name, String description, Set<Costs> costses) {
		this.name = name;
		this.description = description;
		this.costses = costses;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "NAME", unique = true, nullable = false, length = 64)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "DESCRIPTION", length = 512)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "costsTypes")
	public Set<Costs> getCostses() {
		return this.costses;
	}

	public void setCostses(Set<Costs> costses) {
		this.costses = costses;
	}

}
